Repository navigation
feat(bot): pause groups where nobody plays - #99
Merged
Merged
Conversation
A group where nobody plays still got the morning post, the intrigue and the result every day: noise for the group, a reason to remove the bot, and wasted sends. After seven quiet days in a row (the morning post went out and nobody answered from the group; a warm-up is not an answer) the group gets one question in place of the eighth day's intrigue, so it still gets three messages that day. Any member can press "Keep playing", which starts the count again. Only an admin can press "Pause", and the bot checks admin rights with Telegram on each press. If nobody presses a button and nobody answers, the third morning after the question pauses the group: no post, intrigue or result, and the question is edited to say how to resume. /start in a paused group says so and shows Resume to admins. Places come back with the first morning post after the press. An answer from the group at any point resets the count. A paused group is left out of ActiveChats but stays active for its members' answer window. A pause is logged with its cause. A group that removes maply and adds it back starts with no pause and no quiet days. If the quiet check fails, the bot logs the error and sends the post or intrigue anyway: the pause comes a day late, but the group does not lose its message. Migration 032 adds the quiet and pause columns to chat_settings. Closes #94 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A group where nobody plays still got the morning post, the intrigue and
the result every day: noise for the group, a reason to remove the bot,
and wasted sends.
After seven quiet days in a row (the morning post went out and nobody
answered from the group; a warm-up is not an answer) the group gets one
question in place of the eighth day's intrigue, so it still gets three
messages that day. Any member can press "Keep playing", which starts the
count again. Only an admin can press "Pause", and the bot checks admin
rights with Telegram on each press. If nobody presses a button and nobody
answers, the third morning after the question pauses the group: no post,
intrigue or result, and the question is edited to say how to resume.
/start in a paused group says so and shows Resume to admins. Places come
back with the first morning post after the press. An answer from the
group at any point resets the count. A paused group is left out of
ActiveChats but stays active for its members' answer window. A pause is
logged with its cause. A group that removes maply and adds it back starts
with no pause and no quiet days.
If the quiet check fails, the bot logs the error and sends the post or
intrigue anyway: the pause comes a day late, but the group does not lose
its message.
Migration 032 adds the quiet and pause columns to chat_settings.
Closes #94